package com.talent.service.iot.mqtt.model.response;

import com.talent.service.iot.mqtt.model.fix.TlMqttFixedHead;
import io.netty.handler.codec.mqtt.MqttMessageType;

/**
 * @ClassName：TlMqttConnectReq
 * @Author: hszhou
 * @Date: 2024/11/25 11:07
 * @Description: 接收客户端的心跳
 */
public class TlMqttHeartBeat  {

    private TlMqttFixedHead fixedHead;

    public TlMqttFixedHead getFixedHead() {
        return fixedHead;
    }

    public void setFixedHead(TlMqttFixedHead fixedHead) {
        this.fixedHead = fixedHead;
    }

    public static TlMqttHeartBeat of(MqttMessageType messageType){
        TlMqttHeartBeat res = new TlMqttHeartBeat();
        TlMqttFixedHead fixedHead =TlMqttFixedHead.of(messageType);
        res.setFixedHead(fixedHead);
        return res;
    }
}
